<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"


      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:h="http://xmlns.jcp.org/jsf/html">

    <ui:composition template="template.xhtml">
        <ui:define name="content">
            <p:panel id="busqueda">
                <h:panelGrid columns="1"  cellpadding="5" columnClasses="label,value" >
                    <f:facet name="header">
                        <p:graphicImage value="Eshopper/images/shop/product8.png" width="60" height="60"/> 
                    </f:facet>
                    <h:outputText value="Titulo:" style="font-weight: bold; color: #0480be"/>
                    <h:outputText value="#{productosController.buscado.title}" />

                    <h:outputText value="ASIN:" style="font-weight: bold; color: #0480be"/>
                    <h:outputText value="#{productosController.buscado.ASIN}" />

                    <h:outputText value="Grupo:" style="font-weight: bold; color: #0480be"/>
                    <h:outputText value="#{productosController.buscado.group}" />

                    <h:outputText value="Rating:" style="font-weight: bold; color: #0480be"/>
                    <p:rating value="#{productosController.conversion(productosController.buscado.avg_rating)}" readonly="false" disabled="true"/>

                </h:panelGrid>
                <p:commandButton id="createButton" icon="ui-icon-plus" 
                                 actionListener="#{carritoController.agregar(cproductosController.buscado)}" 
                                 update=":formulario"
                                 value="Agregar"  />
                <p:commandButton id="serchButton" icon="ui-icon-plus" 
                                 update="busqueda"
                                 value="Actualizar"  />
            </p:panel>
        </ui:define>
    </ui:composition>

</html>
